package spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("SpringConfig.xml");
        Student s = (Student) context.getBean("student1");
        System.out.println("s = " + s);
        Student s2 = (Student) context.getBean("student2");
        System.out.println("s2 = " + s2);
    }
}
